{% extends "admin_base.html" %}
{% load filters %}
{% block pageTitle %}
    {% if object_name_plural %}
        {{ object_name_plural }}
    {% endif %}
    {% if not object_name_plural and object_name %}
        {{ object_name }}s
    {% endif %}
    {% if not object_name_plural and not object_name %}
        {{ object_list|className }}s
    {% endif %}
{% endblock %}
{% block pageContent %}
    {% if object_list|length %}
    {% for object in object_list %}
    <div class="object">
        <div class="object_actions">
            {% if object.get_delete_url %}
            <a href="javascript:deleteObject('{{ object.get_delete_url }}');" title="Delete {{ object|verboseName|capfirst }}" alt="Delete {{ object|verboseName|capfirst }}">
            {% else %}
            <a href="javascript:deleteObject('{{ object.get_absolute_url }}delete/');" title="Delete {{ object|verboseName|capfirst }}" alt="Delete {{ object|verboseName|capfirst }}">
            {% endif %}
                <img src="{% url ol-root %}styles/admin/images/delete.png" />
            </a>
        </div>
        <div class="objectLinkBox" onclick="document.location = '{{ object.get_absolute_url }}';">
            {% if immutable %}
            <a href="{{ object.get_absolute_url }}" title="View {{ object|verboseName|capfirst }}" alt="View {{ object|verboseName|capfirst }}">
            {% else %}
            <a href="{{ object.get_absolute_url }}" title="Edit {{ object|verboseName|capfirst }}" alt="Edit {{ object|verboseName|capfirst }}">
            {% endif %}
                {{ object }}
            </a>
        </div>
    </div>
    {% endfor %}
    {% if not immutable %}
    <a href="create/" title="New {{ object_list.0|verboseName|capfirst }}" alt="New {{ object_list.0|verboseName|capfirst }}">
        <img src="{% url ol-root %}styles/admin/images/add.png" />
        {% if object_name %}
        	New {{ object_name|title }}
        {% else %}
        	New {{ object_list|className }}
        {% endif %}
    </a>
    {% endif %}
    {% else %}
    <div class="object">
        No
        {% if object_name_plural %}
            {{ object_name_plural|lower }}
        {% endif %}
        {% if not object_name_plural and object_name %}
            {{ object_name|lower }}s
        {% endif %}
        {% if not object_name_plural and not object_name %}
            {{ object_list|className|lower }}s
        {% endif %}
        found.
    </div>
    {% if not immutable %}
    <a href="create/" title="New Object" alt="New Object">
        <img src="{% url ol-root %}styles/admin/images/add.png" />
        {% if object_name %}
        	New {{ object_name|title }}
        {% else %}
        	New {{ object_list|className }}
        {% endif %}
    </a>
    {% endif %}
    {% endif %}
{% endblock %}
